package com.hxzy.projectssmplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxzy.projectssmplus.entity.SysMenu;
import com.hxzy.projectssmplus.mapper.SysMenuMapper;
import com.hxzy.projectssmplus.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

@Service
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService {


    @Autowired
    private SysMenuMapper sysMenuMapper;

    /**
     * 根据用户id查询它拥有的角色的菜单权限(menu中perms)
     * @param adminUserId
     * @return
     */
    @Override
    public Set<String> ownerMenuByUserId(Integer adminUserId) {
        return this.sysMenuMapper.ownerMenuByUserId(adminUserId);
    }
}
